/**
 * 
 */
package com.googlecode.ducktype;

import java.lang.reflect.InvocationHandler;
import java.lang.reflect.Method;

public class CoercedProxy implements InvocationHandler {
    private final Object objectToCoerce;
    
    public CoercedProxy(Object objectToCoerce) {
        this.objectToCoerce = objectToCoerce;
    }

    public Object invoke(Object proxy, Method method, Object[] args)
            throws Throwable {
        return DuckTyper.invokeProxyMethod(objectToCoerce, method, args);
    }
}